package ii.zjf.spring.beans;

import lombok.Data;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.logging.SimpleFormatter;

@Data
public class Student2 {

    private String name;

    private Date birthDay;

    private Time time;

    public Student2(String name, Date birthDay) {
        this.name = name;
        this.birthDay = birthDay;
    }

    public void say() {
        System.out.println("Hello , my name is " + name + " , I'm  create in " + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(birthDay));
    }

}
